package com.reza.simpd.util
{
	import flash.net.SharedObject;
	
	import mx.utils.StringUtil;

	public class HelperUser
	{
		// SharedObject / Users Session
		private var _sharedObjectUser:SharedObject;
		
		public function HelperUser()
		{
			sharedObjectUser = SharedObject.getLocal(System.SHARED_OBJECT_USER);
		}
		
		public function get sharedObjectUser():SharedObject
		{
			return _sharedObjectUser;
		}

		public function set sharedObjectUser(value:SharedObject):void
		{
			_sharedObjectUser = value;
		}

		public function loggedIn():Boolean{
			var loggedIn:Boolean = false;
			if(StringUtil.trim(sharedObjectUser.data.pegawai_nip) != ""){
				loggedIn = true;
			}
			return loggedIn;
		}
	}
}